using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._BusinessAnalystTools._Analysis
{
    /// <summary>
    /// <para>Generate Points From Business Listings</para>
    /// <para>Generates a point feature layer from a business point location search.</para>
    /// <para>根据业务点位置搜索生成点要素图层。</para>
    /// </summary>    
    [DisplayName("Generate Points From Business Listings")]
    public class GeneratePointsFromBusinessListings : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GeneratePointsFromBusinessListings()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output feature class that will contain the returned businesses.</para>
        /// <para>将包含返回的业务的输出要素类。</para>
        /// </param>
        public GeneratePointsFromBusinessListings(object _out_feature_class)
        {
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Business Analyst Tools";

        public override string ToolName => "Generate Points From Business Listings";

        public override string CallName => "ba.GeneratePointsFromBusinessListings";

        public override List<string> AcceptEnvironments => ["baDataSource", "extent", "workspace"];

        public override object[] ParameterInfo => [_out_feature_class, _in_search_features, _search_terms, _exact_match.GetGPValue(), _match_name_only.GetGPValue(), _filters, _max_count, _business_dataset];

        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output feature class that will contain the returned businesses.</para>
        /// <para>将包含返回的业务的输出要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Input Search Features</para>
        /// <para>The area that will be used to search for businesses. Selected features supersede the feature class and will be used as the search area.</para>
        /// <para>将用于搜索商家的区域。所选要素将取代要素类，并将用作搜索区域。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Search Features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_search_features { get; set; } = null;


        /// <summary>
        /// <para>Search Terms</para>
        /// <para>The terms that will be used to search for businesses. You can use terms such as business name or business type keywords. If this parameter is not set, all businesses from the Input Search Features parameter will be returned.</para>
        /// <para>将用于搜索商家的术语。您可以使用商家名称或商家类型关键字等字词。如果未设置此参数，则将返回输入搜索要素参数中的所有业务。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Search Terms")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _search_terms { get; set; } = null;


        /// <summary>
        /// <para>Include Only Exact Matches</para>
        /// <para><xdoc>
        ///   <para>Specifies whether only the text entered in the Search Terms parameter will be returned from the search.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Only exact matches to the text entered in the Search Terms parameter will be returned.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Partial matches to the text entered in the Search Terms parameter as well as exact matches will be returned. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否仅从搜索中返回在“搜索词”参数中输入的文本。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 仅返回与在搜索词参数中输入的文本完全匹配的文本。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将返回与在搜索词参数中输入的文本的部分匹配项以及完全匹配项。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Include Only Exact Matches")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _exact_match_value _exact_match { get; set; } = _exact_match_value._false;

        public enum _exact_match_value
        {
            /// <summary>
            /// <para>EXACT_MATCH</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("EXACT_MATCH")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>PARTIAL_MATCH</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PARTIAL_MATCH")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Match Business or Facility Name Only</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the search will be limited to the business name only.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Only exact matches to the business name entered in the Search Terms parameter will be returned.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Partial matches to the business name entered in the Search Terms parameter as well as exact matches will be returned. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定搜索是否仅限于公司名称。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 仅返回与在搜索词参数中输入的商家名称完全匹配的商品名称。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将返回与在搜索词参数中输入的商家名称的部分匹配项以及完全匹配项。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Match Business or Facility Name Only")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _match_name_only_value _match_name_only { get; set; } = _match_name_only_value._false;

        public enum _match_name_only_value
        {
            /// <summary>
            /// <para>MATCH_NAME_ONLY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("MATCH_NAME_ONLY")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>MATCH_ALL_FIELDS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("MATCH_ALL_FIELDS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Filters</para>
        /// <para><xdoc>
        ///   <para>The filters that will be applied to the Search Terms parameter.</para>
        ///   <bulletList>
        ///     <bullet_item>FilterName—Set filter by dataset field.</bullet_item><para/>
        ///     <bullet_item>FilterValue—Set filter by applying a value to the selected field.</bullet_item><para/>
        ///     <bullet_item>Include—Set filter by including or excluding field values.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将应用于搜索词参数的筛选器。</para>
        ///   <bulletList>
        ///     <bullet_item>FilterName - 按数据集字段设置过滤器。</bullet_item><para/>
        ///     <bullet_item>FilterValue - 通过将值应用于所选字段来设置过滤器。</bullet_item><para/>
        ///     <bullet_item>包括（Include） - 通过包含或排除字段值来设置过滤器。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Filters")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _filters { get; set; } = null;


        /// <summary>
        /// <para>Maximum Number of Points to Return</para>
        /// <para>The limit for the number of returned features. The default value is 1000000.</para>
        /// <para>返回要素数的限制。默认值为 1000000。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Number of Points to Return")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _max_count { get; set; } = 1000000;


        /// <summary>
        /// <para>Business Dataset</para>
        /// <para>The dataset that will be used in the business search.</para>
        /// <para>将在业务搜索中使用的数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Business Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _business_dataset { get; set; } = null;


        public GeneratePointsFromBusinessListings SetEnv(object extent = null, object workspace = null)
        {
            base.SetEnv(extent: extent, workspace: workspace);
            return this;
        }

    }

}